﻿/**
 * The below are data objects. sn:short name dt:district gp: stadium group
 * pt:point ln:line sp: sport tp:type tl:time list
 */
var DDate = {
  prefix : "w",
  title : "title",
  weekday : ["sun", "mon", "tue", "wed", "thu", "fri", "sat"],
  year : "year",
  month : "month",
  day : "day"
};
var DSport = {
  prefix : "s",
  title : "title",
  sports : {
    ar : {
      icon : "archery.png"
    },
    at : {
      icon : "athletics.png"
    },
    bd : {
      icon : "badminton.png"
    },
    bb : {
      icon : "baseball.png"
    },
    bk : {
      icon : "basketball.png"
    },
    bx : {
      icon : "boxing.png"
    },
    ca : {
      sub : ["cf", "cs"],
      icon : ""
    },
	cs : {
	  icon : "kakak_slalom.png"
	},
	cf : {
	  icon : "kayak_flat_water.png"
	},
    cy : {
      sub : ["cb", "ct", "cm", "cr"],
      icon : "cycling.png"
    },
    cb : {
      icon : "cycling.png"
    },
    ct : {
      icon : "cycling.png"
    },
    cm : {
      icon : "cycling.png"
    },
    cr : {
      icon : "cycling.png"
    },
    eq : {
      sub : ["ec", "ed", "es"],
      icon : "equestrian.png"
    },
    fe : {
      icon : "fencing.png"
    },
    fb : {
      icon : "football.png"
    },
    gy : {
      sub : ["ga", "gt", "gr"],
      icon : ""
    },
	ga : {
	  icon : "artistic_gymnastics.png"
	},
	gt : {
	  icon : "trampoline.png"
	},
	gr : {
	  icon : "rhythmic_gymnastics.png"
	},
    hb : {
      icon : "handball.png"
    },
    ho : {
      icon : "hockey.png"
    },
    ju : {
      icon : "judo.png"
    },
    mp : {
      icon : "pentathelon.png"
    },
    ro : {
      icon : "rowing.png"
    },
    sa : {
      icon : "sailing.png"
    },
    sh : {
      icon : "shooting.png"
    },
    so : {
      icon : "softball.png"
    },
    aq : {
      sub : ["sw", "sy", "dv", "wp"],
      icon : ""
    },
	sw : {
	  icon : "swimming.png"
	},
	sy : {
	  icon : "syncronized_swimming.png"
	},
	dv : {
	  icon : "diving.png"
	},
	wp : {
	  icon : "water_polo.png"
	},
    tt : {
      icon : "table_tennis.png"
    },
    tk : {
      icon : "taekwando.png"
    },
    te : {
      icon : "tennis.png"
    },
    tr : {
      icon : "triathelon.png"
    },
    vb : {
      sub : ["vo", "bv"],
      icon : ""
    },
	vo : {
	  icon : "volleyball.png"
	},
	bv : {
	  icon : "beach_volleyball.png"
	},
    wl : {
      icon : "weight_lifting.png"
    },
    wr : {
      sub : ["wf", "wg"],
      icon : "wrestling.png"
    }
  }
};
var DEvent = {};
var DVenue = {
  prefix : "v",
  title : "title",
  category : { // districts
  	all : {
  	  sn : "all"
  	},
    og : {
      sn : "og",
      sub : ["ns", "nis", "nac", "fh", "af", "tc", "hf", "cs", "cg", "ytn"]
    },
    wca : {
      sn : "wca",
      sub : ["src", "srh", "bmx", "lv", "bmc", "brc", "sf", "wis", "bf"]
    },
    nsa : {
      sn : "nsa",
      sub : ["rcp", "tv"]
    },
    ua : {
      sn : "ua",
      sub : ["cis", "buaa", "pu", "cau", "ustb", "bit" ]
    },
    ob : {
      sn : "ob",
      sub : ["but", "ws", "wia", "bvg"]
    },
    oob : {
      sn : "oob",
      sub : ["qd", "br", "st", "tj", "qhd", "sy", "sh"]
    }
  },
  item : { // venues
    ns : {
      pt : [116.396591,39.992840],
      sa_pt : [116.390274,39.991341],
      idx : 1,
      sp:{at:{},fb:{}},
      ln : [  // TODO
        [116.399361,39.907627],
        [116.403320,39.907833],
        [116.406555,39.907909],
        [116.411522,39.908058],
        [116.411507,39.906132],
        [116.412483,39.888371],
        [116.412773,39.884739],
        [116.411865,39.884350],
        [116.411530,39.883823],
        [116.411102,39.883324],
        [116.408852,39.883255],
        [116.409355,39.875031],
        [116.413254,39.875080],
        [116.413345,39.873238],
        [116.400040,39.872776],
        [116.400429,39.875015],
        [116.400146,39.879101],
        [116.399269,39.880035],
        [116.398911,39.881123],
        [116.397957,39.898888],
        [116.398560,39.899063],
        [116.399300,39.899357],
        [116.399635,39.899803],
        [116.399673,39.900322],
        [116.399323,39.907711],
        [116.381180,39.907269],
        [116.363174,39.907349],
        [116.363350,39.913704],
        [116.364548,39.916763],
        [116.364700,39.921124],
        [116.364700,39.922821],
        [116.365967,39.926029],
        [116.367424,39.929108],
        [116.367897,39.931080],
        [116.368050,39.932411],
        [116.325729,39.932510],
        [116.325127,39.942547],
        [116.322342,39.963963],
        [116.317322,39.976330],
        [116.316292,39.985622],
        [116.305496,39.985439],
        [116.304573,39.992935],
        [116.315712,39.992229],
        [116.314896,39.999954],
        [116.332558,40.001221],
        [116.333672,39.976330],
        [116.394485,39.977085],
        [116.394180,39.988201],
        [116.393410,39.993168],
        [116.394012,39.994480],
        [116.394913,39.998032],
        [116.395981,39.996849],
        [116.400192,39.996685],
        [116.400787,39.991688],
        [116.396629,39.992443]
      ]
    },
    nis : {
      pt : [116.390190,39.995888],
      sa_pt : [116.384140,39.994579], idx : 2,
      sp:{gr:{},gt:{},hb:{}}
    },
    nac : {
      pt : [116.390396,39.992912],
      sa_pt : [116.384293,39.991554], idx : 3,
      sp:{sw:{},dv:{},sy:{}}
    },
    fh : {
      pt : [116.390450,39.999546],
      sa_pt : [116.383667,39.998737], idx : 4,
      sp:{fe:{},mp:{}}
    },
    af : {
      pt : [116.377335,40.018314],
      sa_pt : [116.370857,40.017754], idx : 5,
      sp:{ar:{}}
    },
    tc : {
      pt : [116.378044,40.021255],
      sa_pt : [116.373367,40.019070], idx : 6,
      sp:{te:{}}
    },
    hf : {
      pt : [116.377380,40.015453],
      sa_pt : [116.370468,40.015488], idx : 7,
      sp:{ho:{}}
    },
    cs : {
      pt : [116.399414,39.983746],
      sa_pt : [116.393044,39.982250], idx : 9,
      sp:{mp:{}}
    },
    cg : {
      pt : [116.399635,39.986294],
      sa_pt : [116.393471,39.984764], idx : 10,
      sp:{hb:{}}
    },
    ytn : {
      pt : [116.402267,39.986149],
      sa_pt : [116.396133,39.984634], idx : 11,
      sp:{wp:{},mp:{}}
    },
    src : {
      pt : [116.209648,39.947895],
      sa_pt : [116.202927,39.947174], idx : 12,
      sp:{sh:{}}
    },
    srh : {
      pt : [116.207840,39.944901],
      sa_pt : [116.201660,39.943619], idx : 13,
      sp:{sh:{}}
    },
    bmx : {
      pt : [116.214233,39.912617],
      sa_pt : [116.208168,39.911579], idx : 14,
      sp:{cb:{}}
    },
    lv : {
      pt : [116.214859,39.915432],
      sa_pt : [116.207458,39.912815], idx : 15,
      sp:{ct:{}}
    },
    bmc : {
      pt : [116.223465,39.915794],
      sa_pt : [116.215309,39.913933], idx : 16,
      sp:{cm:{}}
    },
    brc : {
      pt : [116.399399,39.871113],
      //TODO
      ln : [
        [116.400169,39.871391],
        [116.400085,39.873451],
        [116.400360,39.874966],
        [116.400360,39.875984],
        [116.400253,39.877090],
        [116.400230,39.878441],
        [116.399864,39.879444],
        [116.399246,39.880104],
        [116.399071,39.880711],
        [116.398819,39.881077],
        [116.398621,39.886440],
        [116.400017,39.886723],
        [116.401413,39.887150],
        [116.404587,39.887959],
        [116.406219,39.888187],
        [116.412506,39.888435],
        [116.411736,39.901142],
        [116.399635,39.900486],
        [116.399117,39.907825],
        [116.406799,39.907959],
        [116.405807,39.933498],
        [116.411606,39.933468],
        [116.417099,39.933632],
        [116.416328,39.950741],
        [116.416817,39.951134],
        [116.417953,39.951248],
        [116.418816,39.951729],
        [116.417183,39.983501],
        [116.407356,39.983139],
        [116.407486,39.988663],
        [116.305519,39.985210],
        [116.304489,39.992706],
        [116.299507,39.992641],
        [116.297493,39.993397],
        [116.295731,39.993790],
        [116.294792,39.997311],
        [116.288994,40.002338],
        [116.287193,40.013386],
        [116.297623,40.014668],
        [116.307152,40.016869],
        [116.318436,40.018677],
        [116.323112,40.019596],
        [116.333755,40.022686],
        [116.337234,40.023308],
        [116.353539,40.023277],
        [116.291740,40.104271],
        [116.271744,40.119827],
        [116.269684,40.122257],
        [116.268356,40.125866],
        [116.267967,40.134792],
        [116.256378,40.148766],
        [116.244278,40.165493],
        [116.241875,40.174938],
        [116.229172,40.199856],
        [116.220932,40.216373],
        [116.212692,40.223713],
        [116.191406,40.226074],
        [116.167030,40.232887],
        [116.157074,40.241798],
        [116.138191,40.248875],
        [116.120682,40.259617],
        [116.112442,40.263546],
        [116.107292,40.270618],
        [116.095276,40.274288],
        [116.048584,40.313828],
        [116.038628,40.334766],
        [116.026955,40.337124],
        [116.020432,40.348637],
        [116.003609,40.359104],
        [115.995369,40.362244],
        [116.077423,40.283455]
      ],
      sa_pt : [116.392860,39.875591], idx : 17,
      sp:{cr:{}}
    },
    sf : {
      pt : [116.276939,39.866566],
      sa_pt : [116.269928,39.865116], idx : 18,
      sp:{so:{}}
    },
    wis : {
      pt : [116.281204,39.911495],
      sa_pt : [116.274811,39.909836], idx : 19,
      sp:{bk:{}}
    },
    bf : {
      pt : [116.276161,39.909538],
      sa_pt : [116.271973,39.907768], idx : 20,
      sp:{bb:{}}
    },
    rcp : {
      pt : [116.688110,40.189629],
      sa_pt : [116.685898,40.174973], idx : 22,
      sp:{ro:{},cf:{},cs:{},sw:{}}
    },
    tv : {
      pt : [116.271484,40.252247],
      sa_pt : [116.266190,40.249809], idx : 23,
      sp:{tr:{}}
    },
    cis : {
      pt : [116.327339,39.940048],
      sa_pt : [116.321152,39.938824], idx : 24,
      sp:{vo:{}}
    },
    buaa : {
      pt : [116.348824,39.980179],
      sa_pt : [116.343307,39.979134], idx : 25,
      sp:{wl:{}}
    },
    pu : {
      pt : [116.315445,39.990570],
      sa_pt : [116.309143,39.987282], idx : 26,
      sp:{tt:{}}
    },
    cau : {
      pt : [116.359802,40.004017],
      sa_pt : [116.353104,40.002331], idx : 27,
      sp:{wr:{}}
    },
    ustb : {
      pt : [116.362534,39.990421],
      sa_pt : [116.356071,39.988991], idx : 28,
      sp:{ju:{},tk:{}}
    },
    bit : {
      pt : [116.315086,39.959293],
      sa_pt : [116.308372,39.957893], idx : 29,
      sp:{vo:{}}
    },
    but : {
      pt : [116.483704,39.872314],
      sa_pt : [116.477531,39.871086], idx : 30,
      sp:{bd:{},ga:{}}
    },
    ws : {
      pt : [116.447311,39.931000],
      sa_pt : [116.441109,39.929501], idx : 31,
      sp:{fb:{}}
    },
    wia : {
      pt : [116.442207,39.932198],
      sa_pt : [116.435959,39.930782], idx : 32,
      sp:{bx:{}}
    },
    bvg : {
      pt : [116.485481,39.946892],
      sa_pt : [116.479477,39.945576], idx : 33,
      sp:{bv:{}}
    },
    qd : {
      pt : [120.392517,36.058674],
      sa_pt : [120.388489,36.056976], idx : 34,
      sp:{sa:{}}
    },
    br : {
      pt : [114.107719,22.494984],
      sa_pt : [114.106865,22.495356], idx : 35,
      sp : { eq : {}}
    },
    st : {
      pt : [114.195374,22.385674],
      sa_pt : [114.202545,22.393625], idx : 36,
      sp : { eq : {}}
    },
    tj : {
      pt : [117.176239,39.077518],
      sa_pt : [117.169640,39.073212], idx : 37,
      sp : { fb : { } }
    },
    qhd : {
      pt : [119.550285,39.907803],
      sa_pt : [119.547668,39.907249], idx : 38,
      sp : { fb : { } }
    },
    sy : {
      pt : [123.432053,41.758732],
      sa_pt : [123.425858,41.756077], idx : 39,
      sp : { fb : { } }
    },
    sh : {
      pt : [121.442024,31.181507],
      sa_pt : [121.437294,31.183416], idx : 40,
      sp : { fb : { } }
    }
  }
};